import base from '@/api/baseurl';
import request from '@/utils/request'


// /* 曲线维护选项-所有 */
// export function transfercurveGpFingTransferCurvecodename(query) {
//   return request({
//     baseURL: base.appBaseApi,
//     url: '/TransfercurveGp/fingTransferCurvecodename',
//     method: 'get',
//     params: query
//   })
// }

// /* 曲线维护选项-被选中的参数 query:id */
// export function transfercurveGpFingTransferCurvecodenamein(query) {
//   return request({
//     baseURL: base.appBaseApi,
//     url: '/TransfercurveGp/fingTransferCurvecodenamein',
//     method: 'get',
//     params: query
//   })
// }


// // 修改曲线维护参数
// export function transfercurveGpAddTransferCurveGpZi(data) {
//   return request({
//     baseURL: base.appBaseApi,
//     url: '/TransfercurveGp/addTransferCurveGpZi',
//     method: 'post',
//     data
//   })
// }


export function findTREAdjustmentRuleDevice(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/findTREAdjustmentRuleDevice',
    method: 'get',
    params: query
  })
}

//单行删除
export function deleteTREAdjustmentRuleDevice(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/deleteTREAdjustmentRuleDevice',
    method: 'get',
    params: query
  })
}


export function addTREAdjustmentRuleDevice(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/addTREAdjustmentRuleDevice',
    method: 'post',
    data
  })
}

export function updateTREAdjustmentRuleDevice(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/updateTREAdjustmentRuleDevice',
    method: 'post',
    data
  })
}

export function deleteTREAdjustmentRuleDeviceBatch(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/deleteTREAdjustmentRuleDeviceBatch',
    method: 'post',
    data
  })
}

/**
 * 组成因子全部数据
 * adj_ft_code 组成因子编号
 * @param {*} query
 * @returns
 */
export function fingfactorcodename(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/fingfactorcodename',
    method: 'get',
    params: query
  })
}

/**
 * 组成因子已选选项
 * @param {*} query
 * @returns
 */
export function fingfactorcodenamein(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/fingfactorcodenamein',
    method: 'get',
    params: query
  })
}

/**
 * 组成因子项修改
 * @param {*} data
 * @returns
 */
export function addfactor(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/addfactor',
    method: 'post',
    data
  })
}

/* 当前因子下的数据 （未选）  */

//  
export function findfactormapingdate(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/findfactormapingdate',
    method: 'get',
    params: query
  })
}

/* 当前因子下已选数据 */

// /AccountBookScheme/fingfactorcodmapingin   m_id  factor_code
export function fingfactorcodmapingin(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/fingfactorcodmapingin',
    method: 'get',
    params: query
  })
}

// /AccountBookScheme/addfactordata 节点 id （以node_id传值），。factor_code，factor_data_code(字符串)
export function addfactordata(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/addfactordata',
    method: 'post',
    data
  })
}


/**
 * 获取转移收支调整规则器的新增调整项编码
 * @param {*} query
 * @returns
 */
export function addadj_it_code(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TREAdjustmentRuleDevice/addadj_it_code',
    method: 'get',
    params: query
  })
}